# !/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2021/4/20 10:45
# @Author  : qiaoc
# @File    : AuditDataPrepare.py
# @Desc    :

from dao.PyMysql import *

class AuditDataPrepare:


    def getRpPaymentInfo(self,bill_number):
        """
            获取报账点电费缴费信息
        :param bill_number: 工单编号
        :return:
        """
        rp_payment_info_tablename = 'rp_payment_info'  # 报账点电费缴费信息表
        rp_payment_info_sql = """SELECT * FROM """ + rp_payment_info_tablename + """ WHERE payment_code='""" + str(
            bill_number) + """' and recycle_id = '0' """
        rp_payment_info_data = PyMysql().get_db_data(rp_payment_info_sql)
        return rp_payment_info_data


    def getPaymentDetailInfo(self,bill_number):
        """
            获取电表缴费明细信息
        :return:
        """
        payment_detail_info_tablename = 'payment_detail_info'  # 电表缴费明细信息-数据库表
        payment_detail_info_sql = """SELECT * FROM """ + payment_detail_info_tablename + """ WHERE payment_code='""" + bill_number + """' and recycle_id = '0' """
        payment_detail_info_data = PyMysql().get_db_data(payment_detail_info_sql)
        return payment_detail_info_data